/*
 * Created on 13.03.2009
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package org.higginsexamples.mailboxserver;

import java.util.HashMap;
import java.util.Map;

public final class SecurityConstants
{
	public static final String AUTH_HEADER_NAME = "Authorization" ;
	public static final String AUTH_CHALLENGE_NAME = "WWW-Authenticate" ;

	public static final String AUTH_TYPE = "SXST" ; // Simple Xml Security Token
	public static final String REQUIRED = "req" ; 
	public static final String OPTIONAL = "opt" ; 

	public static final String CLAIM_SEPARATOR = " " ; 

	public static final String XML_ENCODING = "UTF-8" ; 
	public static final String TAG_TOKEN = "token" ; 
	public static final String TAG_ATTRIBUTES = "attributes" ; 
	public static final String TAG_ATTRIBUTE = "attribute" ; 
	public static final String ATTR_NAME = "name" ; 
	
	public static final String ATTRNAME_EMAIL = "email" ; 
	public static final String ATTRNAME_FIRSTNAME = "firstname" ; 
	public static final String ATTRNAME_LASTNAME = "lastname" ; 
	
	public static final String XMLSOAP_EMAIL = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" ; 
	public static final String XMLSOAP_FIRSTNAME = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" ; 
	public static final String XMLSOAP_LASTNAME = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" ; 

	
	public static final Map<String,String> ATTRIBUTE_MAPPING = new HashMap<String, String>() ;
	
	static
	{
		ATTRIBUTE_MAPPING.put( XMLSOAP_EMAIL, ATTRNAME_EMAIL ) ;
		ATTRIBUTE_MAPPING.put( XMLSOAP_FIRSTNAME, ATTRNAME_FIRSTNAME ) ;
		ATTRIBUTE_MAPPING.put( XMLSOAP_LASTNAME, ATTRNAME_LASTNAME ) ;
	}

}
